public class Main {

    public static void main(String[] args) {
        Solution solution = new Solution();
//        ListNode listNode = solution.removeNthFromEnd(new ListNode(1), 1);
//        System.out.println(listNode);
        ListNode node1 = new ListNode(1);
        ListNode node2 = new ListNode(2);
        ListNode node3 = new ListNode(3);
        node1.next = node2;
        node2.next = node3;
        ListNode listNode = solution.removeNthFromEnd(node1, 3);
        while(listNode != null){
            System.out.println(listNode.val);
            listNode = listNode.next;
        }
    }
}